import request from '../utils/request'

// 获取已报名赛事
export function getEnrolledCompetition() {
  return request({
    url: '/learning/enrolled-competition',
    method: 'get'
  })
}

// 获取知识点
export function getKnowledgePoints() {
  return request({
    url: '/learning/knowledge-points',
    method: 'get'
  })
}

// 更新知识点状态
export function updateKnowledgePoint(data) {
  return request({
    url: '/learning/knowledge-points/update',
    method: 'post',
    data
  })
}

// 获取打卡记录
export function getCheckInRecords() {
  return request({
    url: '/learning/check-in/records',
    method: 'get'
  })
}

// 打卡
export function checkIn() {
  return request({
    url: '/learning/check-in',
    method: 'post'
  })
}
